home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60src.lha / Vim / vim60 / src / testdir / test4.in < prev    next >
Encoding:
Text File  |  2001-09-09  |  839 b   |  32 lines

  1. Test for autocommand that changes current buffer on BufEnter event.
  2. Check if modelines are interpreted for the correct buffer.
  3.  
  4. STARTTEST
  5. :so small.vim
  6. :set nocompatible viminfo+=nviminfo
  7. :au BufEnter Xxx brew
  8. /start of
  9. :.,/end of/w! Xxx   " write test file Xxx
  10. :set ai modeline modelines=3
  11. :sp Xxx             " split to Xxx, autocmd will do :brew
  12. G?this is a
  13. othis should be auto-indented
  14. :                   " Append text with autoindent to this file
  15. :au! BufEnter Xxx
  16. :buf Xxx            " go to Xxx, no autocmd anymore
  17. G?this is a
  18. othis should be in column 1:wq " append text without autoindent to Xxx
  19. G:r Xxx             " include Xxx in the current file
  20. :?startstart?,$w! test.out
  21. :qa!
  22. ENDTEST
  23.  
  24. startstart
  25. start of test file Xxx
  26. vim: set noai :
  27.     this is a test
  28.     this is a test
  29.     this is a test
  30.     this is a test
  31. end of test file Xxx
  32.